<template>
	<div class="svg-demo-container layout-pd">
		<el-card shadow="hover" header="HIcon：组件演示【支持本地图片文件】">
			<!-- iconfont：`iconfont icon-xxx`；fontawesome：`fa fa-xxx`；element：`ele-Xxx` -->
			<HIcon name="iconfont icon-shuju1" color="red" :size="30" title="数据" />
			<HIcon name="fa fa-flag-checkered" color="#008000" :size="30" title="旗帜" />
			<HIcon name="ele-Trophy" color="orange" :size="30" title="奖杯" />
			<HIcon :name="logoMini" :size="30" title="LogoMini" />
		</el-card>
		<el-card shadow="hover" header="HIcon：参数说明" class="mt15">
			<el-table :data="state.tableData" style="width: 100%">
				<el-table-column prop="a1" label="参数"></el-table-column>
				<el-table-column prop="a2" label="说明"></el-table-column>
				<el-table-column prop="a3" label="类型" align="center"></el-table-column>
				<el-table-column prop="a4" label="可选值" align="center"></el-table-column>
				<el-table-column prop="a5" label="默认值" align="center"></el-table-column>
			</el-table>
		</el-card>
	</div>
</template>

<script setup lang="ts" name="iconDemo">
import { reactive } from "vue";
import logoMini from "/@/assets/images/logo/logo-mini.png";

// 定义变量内容
const state = reactive({
	tableData: [
		{
			a1: "name",
			a2: "图标名称 / 图片文件的 url【必填】",
			a3: "string",
			a4: "/",
			a5: "/",
		},
		{
			a1: "size",
			a2: "图标大小（单位px）",
			a3: "number",
			a4: "/",
			a5: 14,
		},
		{
			a1: "color",
			a2: "图标颜色（支持CSS变量）",
			a3: "string",
			a4: "/",
			a5: "/",
		},
		{
			a1: "title",
			a2: "图标提示文本",
			a3: "string",
			a4: "/",
			a5: "/",
		},
	],
});
</script>
